package graphic.scene;

import graphic.primitives.general.GraphicObject;
import graphic.primitives.general.IGraphicObject;
import graphic.window.MainWindow;
import java.awt.Color;

public class Stage3 extends GraphicObject implements IGraphicObject
{
	@Override
	public void redraw()
	{
		for (int i = 210; i < 1000; i++)
		{
			float q = (float) (i) / 1000.0f;
			
			mainWindow.setColor(new Color(q, q, q));
			mainWindow.line(0, i, 1000, i);
		}
		
		mainWindow.setColor(Color.BLACK);

		float f = 0.6f;
		for (int i = 388; i < 1000; i++)
		{
			MainWindow.getInstance().setColor(new Color(f, f, f));
			MainWindow.getInstance().line(0, i, 1000, i);
			
			if (i % 5 == 0)
			{
				f -= 0.01f;
			}
			
			if (f < 0.1f)
			{
				break;
			}
		}	
		
		mainWindow.setColor(Color.BLACK);
	}
}
